<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>四位数的水仙花数</title>
    <script>
        for(var i =1000; i <= 9999;i++){
            var ge = i % 10,
            shi = parseInt(i / 10) % 10,
            bai = parseInt(i / 100) % 10,
            qian = parseInt(i / 1000);
            if(i === (ge*ge*ge*ge + shi*shi*shi*shi + bai*bai*bai*bai + qian*qian*qian*qian)){
                console.log(i);
            }
        }
        
    </script>
</head>
<body>
    
</body>
</html>